
// 动态菜单导航，除了首页登录

const Product = () => import('@/views/product/Index.vue')
const List = () => import('@/views/product/list/Index.vue')
const Category = () => import('@/views/product/category/Index.vue')
const ProductPage = () => import('@/views/product/list/ProductPage.vue')

const Order = () => import('@/views/order/Index.vue')
const OrderList = () => import('@/views/order/orderList/Index.vue')
const Collect = () => import('@/views/order/orderCollect/Index.vue')

const Advert = () => import('@/views/advert/Index.vue')
const AdvertList = () => import('@/views/advert/advertList/Index.vue')

//系统管理
import SystemManage from "@/views/SystemManage"
import department from '@/views/SystemManage/department'
import role from '@/views/SystemManage/role'
export const menu = [
    {
        path: '/product',//产品管理
        name: 'procuct',
        component: Product,
        redirect: '/product/list',
        meta: {
            title: '产品管理'
        },
        children: [
            {
                path: 'list',//访问/product/list
                name: 'list',
                component: List,
                meta: {
                    title: '产品列表'
                },
            },
            {
                path: 'category',//访问/product/category
                name: 'category',
                component: Category,
                meta: {
                    title: '产品分类'
                },
            },
            {
                path: 'productPage',//访问/product/productPage
                name: 'ProductPage',
                component: ProductPage,
                meta: {
                    // activeMenu: '/product/list',
                    activeMenu: 'list',
                    title: '添加商品',
                }
            },

        ],
    },
    {
        path: '/order',//订单
        name: 'order',
        component: Order,
        redirect: '/order/order-list',
        meta: {
            title: '订单管理'
        },
        children: [
            {
                path: 'order-list',//访问/order/order-list
                name: 'order-list',
                component: OrderList,
                meta: {
                    title: '订单列表'
                },
            },
            {
                path: 'collect',//访问/order/collect
                name: 'collect',
                component: Collect,
                meta: {
                    title: '汇总清单'
                },
            },
        ],
    },
    {
        path: '/advert',//广告
        name: 'advert',
        component: Advert,
        meta: {
            title: '广告分类'
        },
        children: [
            {
                path: 'advert-list',//访问/advert/advert-list
                name: 'advert-list',
                component: AdvertList,
                meta: {
                    title: '广告列表'
                },
            },
        ],
    },
    {
        path: "/system",
        name: "system",
        component: SystemManage,
        redirect: "/system/role",
        meta: {
            title: "系统管理",
        },
        children: [
            {
                path: "role",
                name: "role",
                component: role,
                meta: {
                    title: "角色管理",
                },
            },
            {
                path: "department",
                name: "department",
                component: department,
                meta: {
                    title: "部门管理",
                },
            },
        ],
    },
]